package jobs;

import java.util.List;

import models.Plan;
import play.jobs.Job;
import play.jobs.On;

//@Every("1min")
//@On("0 * * * * ?") 
///** Chequear expresiones **/
@On("0 30 23 * * ?")
public class PlansJobs extends Job {
	
	@Override
	public void doJob() throws Exception {
		List<Plan> planes = Plan.findByFechaFin();
		
		for (Plan plan : planes) {
			plan.desactivar();
			plan.save();
		}
	}
}
